home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
prodpack.zip
/
DB4PPSAM.EXE
/
BDCDRIVE.PRG
< prev
next >
Wrap
Text File
|
1993-05-10
|
4KB
|
154 lines
PROCEDURE BDCDrive
*----------------------------------------------------------------------------
* NAME
* BDCDrive - Sets up run time environment, runs dialog, and builds app
*
* DESCRIPTION
*
*----------------------------------------------------------------------------
SET COLOR OF NORMAL TO w+/bg
SET COLOR OF HIGHLIGHT TO rg+/w
SET COLOR OF MESSAGES TO w/b
SET COLOR OF TITLES TO n/bg
SET COLOR OF BOX TO W+/b
SET COLOR OF INFORMATION TO bg+/b
SET COLOR OF FIELDS TO W+/n
SET CATALOG TO
SET CATALOG OFF
SET ESCAPE OFF
SET SCOREBOARD OFF
SET STATUS OFF
SET TALK OFF
SET EXCLUSIVE OFF
SET DBTRAP OFF
SET TYPEAHEAD TO 400
cBDCCmd = ""
PUBLIC ARRAY BDCOPT[ 14 ]
*-- CD_FILE_1 - XXXXXXXXXXXXX [v]
BDCOPT[ 1 ] = [*.CFG] + SPACE( 12 )
*-- BT_EDITCF - E~dit config file
BDCOPT[ 2 ] = .F.
*-- RB_MODE_1 - ( ) ~Compact
BDCOPT[ 3 ] = .T.
*-- RB_MODE_2 - ( ) ~Standalone
BDCOPT[ 4 ] = .F.
*-- CK_OPTI_1 - [ ] Compile ~only
BDCOPT[ 5 ] = .F.
*-- CK_OPTI_2 - [ ] Dis~play offending code
BDCOPT[ 6 ] = .T.
*-- CK_OPTI_3 - [ ] ~No warning messages
BDCOPT[ 7 ] = .T.
*-- CK_OPTI_4 - [ ] Set Lang~Tables on
BDCOPT[ 8 ] = .F.
*-- CD_LIST_1 - XXXXXXXXXXXXX
BDCOPT[ 9 ] = SPACE( 13 )
*-- BT_EDIT - ~Edit file list
BDCOPT[ 10 ] = .F.
*-- BT_OK - Ok
BDCOPT[ 11 ] = .T.
*-- BT_CANCEL - Cancel
BDCOPT[ 12 ] = .F.
*-- BT_HELP - Help
BDCOPT[ 13 ] = .F.
*-- BT_LINK - ~Link options ...
BDCOPT[ 14 ] = .F.
*--------------------------------------------------------------
*-- FXL_Cancel is set to .T. is the user Cancels the dialog box
*--------------------------------------------------------------
FXL_Cancel = .F.
*--------------------------------------------------------------
*-- FXL_NoChng lets the dialog box know that the values in the
*-- array are not different from the SCR file defaults. This
*-- will allow the dialog box to use the .WIN file for a faster
*-- startup.
*--------------------------------------------------------------
FXL_NoChng = .T.
DO BDCOPT
IF .NOT. FXL_Cancel && The user clicked on OK
cCfg = ""
lLinkOpt = TYPE( "BDCLINK[ 1 ]" ) <> "U"
IF .NOT. ISBLANK( BDCOPT[ 1 ] ) .AND. ;
.NOT. ( "*" $ BDCOPT[ 1 ] .OR. "?" $ BDCOPT[ 1 ] ) .AND. ;
FILE( TRIM( BDCOPT[ 1 ] ) )
cCgf = ' +' + TRIM( BDCOPT[ 1 ] )
ENDIF
IF BDCOPT[ 5 ]
cBDCCmd = cBDCCmd + " -c"
ENDIF
IF BDCOPT[ 6 ]
cBDCCmd = cBDCCmd + " -t"
ENDIF
IF BDCOPT[ 7 ]
cBDCCmd = cBDCCmd + " -w"
ENDIF
IF BDCOPT[ 8 ]
cBDCCmd = cBDCCmd + " -X"
ELSE
cBDCCmd = cBDCCmd + " -x"
ENDIF
IF lLinkOpt .AND. .NOT. ISBLANK( BDCLINK[ 1 ] )
cBDCCmd = cBDCCmd + " -B " + TRIM( BDCLINK[ 1 ] )
ENDIF
IF lLinkOpt .AND. .NOT. ISBLANK( BDCLINK[ 2 ] )
cBDCCmd = cBDCCmd + " -C " + TRIM( BDCLINK[ 2 ] )
ENDIF
IF lLinkOpt .AND. .NOT. ISBLANK( BDCLINK[ 3 ] )
cBDCCmd = cBDCCmd + " -E " + TRIM( BDCLINK[ 1 ] )
ENDIF
IF BDCOPT[ 4 ]
cBDCCmd = cBDCCmd + " -L"
ENDIF
cBDCCmd = cBDCCmd + " " + TRIM( BDCOPT[ 9 ] )
cBDCCmd = cBDCCmd + cCfg
DO _Err_Box WITH cBDCCmd
x = RUN( "BDC " + cBDCCmd, .T. )
ENDIF
RELEASE BDCOPT
RELEASE BDCLINK
RETURN
*-- EOP: BDCDrive